<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\models\User */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Users'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<!--BEGIN HEADER-->
<div class="section-header">
    <h3 class="text-standard"><i class="fa fa-fw fa-arrow-circle-right text-gray-light"></i> <?=$this->title?> <small><?=$this->subTitle?></small></h3>
</div>
<!--END HEADER-->
<!--BEGIN BODY-->
<div class="section-body">
    <div class="user-view">
        <p>
            <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->userid], ['class' => 'btn btn-primary' . ($partial?" hide":"")]) ?>
            <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->userid], [
                'class' => 'btn btn-danger' . ($partial?" hide":""),
                'data' => [
                    'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
                    'method' => 'post',
                ],
            ]) ?>
        </p>

        <?= DetailView::widget([
            'model' => $model,
            'attributes' => [
                [
                    'label' => 'Head Pic',
                    'value' => Html::img($model->headpic, ['Width' => '200px']),
                    'format' => 'html',
                ],
                [
                    'label' => 'Info Pic',
                    'value' => Html::img($model->infopic, ['width' => '200px']),
                    'format' => 'html',
                ],
                'userid',
                'username',
                'name',
                'age',
                [
                    'label' => 'gender',
                    'value' => $model->gender == 0 ? 'female' : 'male',
                ],
                'certno',
                'create_timestamp:datetime',
                'modify_timestamp:datetime',
                'modifyUsername',
            ],
        ]) ?>
    </div>
</div>
<!--END BODY-->

